package demo;

//import com.sun.istack.internal.NotNull;
//import com.sun.net.httpserver.HttpServer;

import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
import sun.rmi.runtime.Log;

import javax.xml.ws.RequestWrapper;
import java.io.*;
import java.awt.*;
import java.awt.event.*;

import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.SecureRandom;
import java.security.spec.X509EncodedKeySpec;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Dictionary;
import java.util.Observable;
import java.util.Enumeration;
import java.security.*;
import java.util.*;
import java.util.Arrays;
import java.util.Random;


class MinStack {

    /** initialize your data structure here. */
    Stack<Integer> data = new Stack<Integer>();
    Stack<Integer> min_Data = new Stack<Integer>();


    public MinStack() {

    }

    public void push(int x) {
        data.push(x);

        if (min_Data.empty()){
            min_Data.push(x);
        }else{
            if (min_Data.peek() > x){
                min_Data.push(x);
            }else{
                min_Data.push(min_Data.peek());
            }
        }
    }

    public void pop() {
        data.pop();
        min_Data.pop();
    }

    public int top() {
        return data.peek();
    }

    public int getMin() {
        return min_Data.peek();
    }
}



public class LearnJava
{




}

//public class LearnJava {
//
//    public static void main(String[] args) {
//        String strNow = new SimpleDateFormat("/yyyy/MM/dd/").format(new Date()).toString();
//        System.out.println(strNow);
//    }
//}











//public class LearnJava {
//
//    public static void main(String[] args) {
//        RSAUtils.generateKeyPair("/Users/vonmax/Downloads/RSA");
//
////        String publicKey;
////        String privateKey;
////
////        publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAviSuCu4Yg/WAyjp06qiaE/ioI2M/ACT9UTUVxWtM7IZlXMQZPjLn0H1x0zmJ/VLIhnBliyb06QLvtrrBFRt4jnOJR5LjoTg/g8XYdVXN6a+XFjqFvOUPgzZ7OdywOoXxiO+M7WrvT0XgqyBqCnDADpY1eucDqfIDYYOBHKbtMkh0N4ZVBcfULb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ghE7+gh9RYiVcI6/8LwKBgQDSYEuWFLMUsR/s7unSHCucuEXjwbYrvknv8Y81sjvrWktNXrJoYlbGy/7HYA6lxzchtSxhPuUSjopwQ5scgMhqf8Gxz7jsDN9ak2dErF7cWRFYfh6aKhkbEw9oG01jIX15MK0TbMafoJslDhPQF1cP9i0+ZGg+gPbASdeUVRTNoQKBgQCOjwDOLgYeiMtXCOtL8hymCmsNDCKaaiUzgRijuhEyHzamJhe13Gj/TnwAh+hRI9UX333jjNJawqDuLXz1dQ5Eg6vjPQQVo2XZNzRnOuwpbJDKHUrPK3Lzkn+qIP6ii/y7eQu+GvSM/AUYsxfGy6RLYh1yJvLw1sVrBDiWk5prmwKBgFvgrmI3XBa3XKgPl5KptupVGEDmAveLvaLLLq5WzxB0eNqrduNbv2ZHBVhxvTPtk0hnZaB65XR7SD7LZ9zE6cKJVUCg5bRB0vIt2jYFydAWHhs1yYuuwxQt+NaQxfV7VN8uwQfww7ZHYDqIsWJ6Lw3Lh+rt0xEpJZrJJRulJNbBAoGBAK1OEnfBpSB99N8gdhp+ZGLsDfwFCQ2Cd4Jpsd4hxdwbXevNuA1OiE20sHPuKqEqfOKocgTMobCwbSfnymatRydVoeUumkEc4Ja+XDgH+P1eXQLdIuRCwh0AXl+vkuOCBDMw367Zp/j6vwPlNKh9ZmOBPwhV0Syv2Z8uGkTZ6g+f";
////
////
////        System.err.println("公钥加密——私钥解密");
////        String source = "高可用架构对于互联网服务基本是标配。";
////        System.out.println("\r加密前文字：\r\n" + source);
////        String aData = RSAUtils.encrypt(publicKey, source);
////        System.out.println("加密后文字：\r\n" + aData);
////        String dData = RSAUtils.decrypt(privateKey, aData);
////        System.out.println("解密后文字: \r\n" + dData);
//    }
//}






//import  java.util.*;


/*
public class LearnJava
{
    public static void main(String Args[])
    {
        char ch = ' ';
        System.out.print("Please enter a chac: ");
        try{
            ch = (char)System.in.read();

        }
        catch(IOException e){

        }
        System.out.println("The cahr your neter is "+(int)ch);
    }


}
*/



/*

public class LearnJava{
    public static void main(String []args){
        new Frame1();
    }
}

class Frame1 extends Frame{
    Frame1(){
        addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e){
                System.exit(0);
            }
        });


    setSize(350, 200);
    setVisible(true);
    }
}
*/

/*public class LearnJava{
    public static void main(String []args)throws java.io.IOException{
//        FileReader fr = new FileReader("/Users/vonmax/Projects/Java_Study/src/LearnJava.java");
        FileReader fr = new FileReader("src/LearnJava.java");
        BufferedReader br = new BufferedReader(fr);
        String str;
        while((str = br.readLine()) != null)
            System.out.println(str);
        br.close();
        fr.close();

    }
}*/

/*public class LearnJava extends  Thread {
    public static void main(String[] args) throws java.io.IOException {

        LearnJava[] runner = new LearnJava[4];
        for (int i = 0; i < 4; ++i) runner[i] = new LearnJava();
        for (int i = 0; i < 4; ++i) runner[i].start();
        runner[1].setPriority(MIN_PRIORITY);
        runner[3].setPriority(MAX_PRIORITY);

    }
    public void run(){
        for(int i=0;i<10000000;++i);
        System.out.println(getName()+"Thread prioity is :"+getPriority()+"  and Pri compute over! ");
    }

}*/


/*public class LearnJava {

    int height = 5;

    public static void main(String[] args) throws java.io.IOException {

        for(int i=0;i<4;++i)
        {
            //System.out.println("  Cleaning memory ...  ");
            new LearnJava();
            Runtime.getRuntime().gc();
        }

    }
    public void finalize(){

        System.out.println("  Cleaning memory ...  ");
    }

}*/

/*public class LearnJava {



    public static void main(String[] args) throws java.io.IOException {

        Collection books = new HashSet();
        books.add("J2EE in enterprise");
        books.add("Structs2");

        Iterator it = books.iterator();
        while(it.hasNext())
        {
            String book = (String)it.next();
            System.out.println(book);

            if(book.equals("Structs2"))
            {
                it.remove();
                System.out.println(books.size());
            }




        }

    }

}*/












